package com.du.dupload;
public interface IUICallback {

    /**
     * Appends text to the main text area. This method can be called from outside EDT.
     *
     * @param text text to append
     */
    @RequiresEDT
    void setInfo(String text);

    /**
     * Sets text to the main text area, replacing existing context. This method can be called from outside EDT.
     *
     * @param text text to set
     */
    @RequiresEDT
    void setStatus(String text);
    


    /**
     * Sets current progress. Values should be in the range [0,100]. This method can be called from outside EDT.
     *
     * @param progressPercent progress value to set
     */
    @RequiresEDT
    void setProgress(float progressPercent);

    /**
     * Performs required UI operations when loading starts. This method can be called from outside EDT.
     */
    @RequiresEDT
    void startLoading(String name);

    /**
     * Performs required UI operations when loading stops. This method can be called from outside EDT.
     */
    @RequiresEDT
    void stopLoading();

    /**
     * Displays error message. This method can be called from outside EDT.
     *
     * @param message message to display
     */
    @RequiresEDT(RequiresEDTPolicy.SYNC)
    void showError(String message);
    
    @RequiresEDT
    void setItemName(String text);
    
    @RequiresEDT
    void setCallback(IUICallbackHandler ch);
    
    @RequiresEDT
    void setFinished();
    
}